// Heightmap.h

#ifndef HEIGHTMAP_H_INCLUDED
#define HEIGHTMAP_H_INCLUDED

class Heightmap {

public:
	struct Vertex {
		Vector3 position;
		Vector2 texcoord;
		Vector3 normal;
	};

	Heightmap();

	bool Create(class RenderSystem *render_system,const String &filename);
	void Destroy();

	void Render(class RenderSystem *render_system,OncePerFrame *frame,DirectionalLight *light);

	Vertex* GetVertices() const { return m_vertices; };

private:
	Shader m_shader;
	Texture m_texture;

	Texture m_splat_texture;
	Texture m_grass_texture;
	Texture m_road_texture;

	DepthState m_depth;
	RasterizerState m_rasterizer;
	Renderable m_renderable;

	Vertex* m_vertices;
};

#endif // HEIGHTMAP_H_INCLUDED
